package com.gec.dao;

import com.gec.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/*
 *  Author: DawnFz.com
 *  Date: 2022/9/19 9:24
 *  Project: HotelProject
 *  Version: 1.0
 *  Describe: []
 */
public interface RoleDao
{

    int getCount(String sqlPart) throws SQLException;

    List<Role> getRoleList(Map<String, String> map) throws SQLException;

    Role getRoleById(String id) throws SQLException;

    int updateRole(Role role) throws SQLException;

    int delRole(String id) throws SQLException;

    int addRole(Role role) throws SQLException;

    Set<String> getRolePermission(@Param("roleId") String roleId);

    boolean addRolePermission(@Param("id") String id,
                              @Param("roleId") String roleId,
                              @Param("permission") String permission)throws SQLException;
}
